package net.sf.jimex.project.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * andrew 19.02.2006 14:16:36
 */
public class Item {
    protected Map propertiesMap;
    protected List tasks;
    public static final String KEY_ID = "id";

    public Item() {
        propertiesMap = new HashMap();
        tasks = new ArrayList();
    }

    public void addProperty(String key, String value) {
//        assert key != null;
//        assert value != null;

        propertiesMap.put(key, value);
    }

    public String getProperty(String key) {
        String property = (String) propertiesMap.get(key);
        property = (property == null) ? "" : property;
        return property;
    }

    public String getId() {
        return getProperty(KEY_ID);
    }
}
